
#include <iostream>
#include "Vector2.h"
#include "Vector3.h"

using namespace std;
using namespace Physics;

void Vector2Testing();
void Vector3Testing();

int main ()
{
	cout << "Hello\n\n";

	Vector2Testing();

	Vector3Testing();

	system("pause");

	return EXIT_SUCCESS;
}

void Vector2Testing()
{
	cout << "Beginning Vector2 testing...\n";
	cout << "-----------------------------------------\n\n";

	Vector2 vec1 = Vector2();
	Vector2 vec2 = Vector2(5.0, 5.0);
	
	cout << "Vec1 = (" << vec1.getX() << ", " << vec1.getY() << ")\n\n";
	cout << "Vec2 = (" << vec2.getX() << ", " << vec2.getY() << ")\n\n";

	cout << "Does vec1 equal vec2? ";

	bool equal = (vec1 == vec2);

	if(equal)
	{
		cout << "YES\n\n";
	}
	else
	{
		cout << "NO\n\n";
	}

	cout << "Vec1 = Vec1 + Vec2.....\n\n";
	vec1 = vec1 + vec2;

	cout << "Vec2 = Vec1 * Vec2.....\n\n";
	vec2 = vec1 * vec2;


	cout << "Vec1 = (" << vec1.getX() << ", " << vec1.getY() << ")\n\n";
	cout << "Vec2 = (" << vec2.getX() << ", " << vec2.getY() << ")\n\n";

	cout << "Vec2 = Vec2 - Vec1.....\n\n";
	vec2 = vec2 - vec1;

	cout << "Vec1 = (" << vec1.getX() << ", " << vec1.getY() << ")\n\n";
	cout << "Vec2 = (" << vec2.getX() << ", " << vec2.getY() << ")\n\n";

	cout << "Using Copy Constructor now...\n\n";
	cout << "Copying vec2 into vec3..\n\n";

	Vector2 vec3(vec2);

	cout << "Vec1 = (" << vec1.getX() << ", " << vec1.getY() << ")\n\n";
	cout << "Vec2 = (" << vec2.getX() << ", " << vec2.getY() << ")\n\n";
	cout << "Vec3 = (" << vec3.getX() << ", " << vec3.getY() << ")\n\n";

	cout << "Does vec3 equal vec2? ";
	equal = (vec3 == vec2);

	if(equal)
		cout << "YES\n\n";
	else
		cout << "NO\n\n";

	cout << "Done Testing Vector2...\n";
	cout << "-----------------------------------------\n\n";
}

void Vector3Testing()
{
	cout << "Beginning Vector3 testing...\n";
	cout << "-----------------------------------------\n\n";

	Vector3 vec1 = Vector3();
	Vector3 vec2 = Vector3(3.0, 3.0, 3.0);
	
	cout << "Vec1 = (" << vec1.getX() << ", " << vec1.getY() << ", " << vec1.getZ() << ")\n\n";
	cout << "Vec2 = (" << vec2.getX() << ", " << vec2.getY() << ", " << vec2.getZ() << ")\n\n";

	cout << "Does vec1 equal vec2? ";

	bool equal = (vec1 == vec2);

	if(equal)
	{
		cout << "YES\n\n";
	}
	else
	{
		cout << "NO\n\n";
	}

	cout << "Vec1 = Vec1 + Vec2.....\n\n";
	vec1 = vec1 + vec2;

	cout << "Vec2 = Vec1 * Vec2.....\n\n";
	vec2 = vec1 * vec2;


	cout << "Vec1 = (" << vec1.getX() << ", " << vec1.getY() << ", " << vec1.getZ() << ")\n\n";
	cout << "Vec2 = (" << vec2.getX() << ", " << vec2.getY() << ", " << vec2.getZ() << ")\n\n";

	cout << "Vec2 = Vec2 - Vec1.....\n\n";
	vec2 = vec2 - vec1;

	cout << "Vec1 = (" << vec1.getX() << ", " << vec1.getY() << ", " << vec1.getZ() << ")\n\n";
	cout << "Vec2 = (" << vec2.getX() << ", " << vec2.getY() << ", " << vec2.getZ() << ")\n\n";

	cout << "Using Copy Constructor now...\n\n";
	cout << "Copying vec2 into vec3..\n\n";

	Vector3 vec3(vec2);

	cout << "Vec1 = (" << vec1.getX() << ", " << vec1.getY() << ", " << vec1.getZ() << ")\n\n";
	cout << "Vec2 = (" << vec2.getX() << ", " << vec2.getY() << ", " << vec2.getZ() << ")\n\n";
	cout << "Vec3 = (" << vec3.getX() << ", " << vec3.getY() << ", " << vec3.getZ() << ")\n\n";

	cout << "Does vec3 equal vec2? ";
	equal = (vec3 == vec2);

	if(equal)
		cout << "YES\n\n";
	else
		cout << "NO\n\n";

	cout << "Done Testing Vector3...\n";
	cout << "-----------------------------------------\n\n";
}